#include <iostream>
using namespace std;

class Person
{
public:
  string m_name;
  int m_age;

  Person(string name, int age)
  {
    m_name = name;
    m_age = age;
  }

  bool operator==(Person &p)
  {
    if (m_name == p.m_name && m_age == p.m_age)
    {
      return true;
    }
    return false;
  }

  bool operator!=(Person &p)
  {
    if (m_name == p.m_name && m_age == p.m_age)
    {
      return false;
    }
    return true;
  }
};

void test01()
{
  Person p1("Tom", 18);

  Person p2("Tom", 18);

  if (p1 == p2)
  {
    cout << "相等" << endl;
  }
  else
  {
    cout << "不相等" << endl;
  }

  if (p1 != p2)
  {
    cout << "不相等" << endl;
  }
  else
  {
    cout << "相等" << endl;
  }
}

int main(int argc, char const *argv[])
{

  test01();

  return 0;
}